#include "multiSprite.h"
using std::cout; using std::endl;

void MultiSprite::advanceFrame(Uint32 ticks) {
  static float ms = 1000.0/frameInterval;
  static float dt = 0;
  dt += ticks;
  int df = dt / ms;
  dt -= df * ms;
  currentFrame = (currentFrame + df) % numberOfFrames;

}

void MultiSprite::update(Uint32 ticks) { 
  advanceFrame(ticks);
  // If we're okay with the default behavior, We could just use 
  // the update in sprite, which means we don't even need this one.
  // For testing purposes, I used the following 2 statements:
  // Sprite::update(ticks);
  // return;

  // But, since it seems to be working, I'll make Pter wrap around:


}

